<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/cms/Public/Admin/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/cms/Public/Admin/css/bootstrap-responsive.css">
    <link rel="stylesheet" type="text/css" href="/cms/Public/Admin/css/style.css">
    <link type="text/css" href="/cms/Public/Admin/css/b5m-plugin.css" rel="stylesheet">
    <link type="text/css" href="/cms/Public/Admin/css/b5m.css" rel="stylesheet">
</head>
<body>    
     
  	 <table class="table table-bordered table-hover definewidth m10">
  		<tbody>
  		<tr>
    	  <td width="100px">成员</td> 
    	  <td>资源号码</td>
        <td>资源状态</td>
        <td>资源备注</td>   	
    	</tr>
      <?php if(is_array($resource)): $i = 0; $__LIST__ = $resource;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$r): $mod = ($i % 2 );++$i;?><tr>
    	   <td width="100px"><?php echo ($username); ?></td> 
         <td><?php echo ($r["pnumber"]); ?></td>
         <td><?php if($r["sid"] == 0): ?>未使用
            <?php elseif($r["sid"] == 1): ?>申请未通过 
            <?php elseif($r["sid"] == 2): ?>已通过
            <?php elseif($r["sid"] == 6): ?>A类意向客户
            <?php elseif($r["sid"] == 7): ?>B类意向客户
            <?php elseif($r["sid"] == 8): ?>C类意向客户
            <?php elseif($r["sid"] == 9): ?>D类意向客户
            <?php elseif($r["sid"] == 4): ?>已入金
            <?php elseif($r["sid"] == 5): ?>非微信号码<?php endif; ?></td>
         <td><?php echo ($r["wechatname"]); ?></td>
    	 </tr><?php endforeach; endif; else: echo "" ;endif; ?>

   </tbody>
     
   </table>
      <div class="inline  page" style="text-align: center;">
         <?php echo ($count); ?> 条记录 <?php echo ($page); ?>/<?php echo ($resPage); ?>页 
  　<a style="margin-right: -10px;" href="javascript:upPage(<?php echo ($page); ?>,<?php echo ($userid); ?>,<?php echo ($sid); ?>)">上一页</a>
  　<span style="color:red"><?php echo ($page); ?></span>
   　　<a style="margin-left: -20px;" href="javascript:nextPage(<?php echo ($page); ?>,<?php echo ($resPage); ?>,<?php echo ($userid); ?>,<?php echo ($sid); ?>)">下一页</a>
       &nbsp;&nbsp;&nbsp;跳转到第<input id="toPage" style="width:30px;height:20px;padding-top: 4px;" type="text">页
        <a href="javascript:toGoPage()">跳转</a>
    　</div> 

</body>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }

    </style>
    <script type="text/javascript">
      function upPage(page,userid,sid){
    if(page==1){
      alert('已经是第一页了');
    }else{
      page--;
    }
    window.location.href="guanlizuyuan?page="+page+"&userid="+userid+"&sid="+sid;
       
  }
  function nextPage(page,pa,userid,sid){

    if(page==pa){
      alert('已经是最后一页了');
    }else{
      page++;
    }
    window.location.href="guanlizuyuan?page="+page+"&userid="+userid+"&sid="+sid;
       
  }
  function toGoPage(){
    var page = $('#toPage').val();
    if(isNaN(page)){
      alert('请输入数字');
      exit;
    }
    window.location.href="guanlizuyuan?page="+page;
  }
    
    </script>
</html>